package com.ride.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;

/**
 * Entität zur Abbildung von Fahrtgesuchen
 *
 * @version $LastChangedRevision: 14 $
 *          <p/>
 *          $LastChangedBy: marcel.menze@gmail.com $
 *          <p/>
 *          $LastChangedDate: 2011-04-03 13:42:04 +0000 (Sun, 03 Apr 2011) $
 */
@Entity
public class RideSearch implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long id;

    @ManyToOne
    @JoinColumn(name = "PROFILE_ID")
    private Profile profile;

    @OneToOne
    @JoinColumn(name = "START_ADDR_ID")
    private Address startAddress;

    private Date startDate;

    @OneToOne
    @JoinColumn(name = "DEST_ADDR_ID")
    private Address destination;

    private Integer numberOfPassenger;

    private Double Price;

    private String currentLogitude;

    private String currentLatitude;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public Profile getProfile() {
        return profile;
    }

    public void setProfile(Profile profile) {
        this.profile = profile;
    }

    public Address getStartAddress() {
        return startAddress;
    }

    public void setStartAddress(Address startAddress) {
        this.startAddress = startAddress;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Address getDestination() {
        return destination;
    }

    public void setDestination(Address destination) {
        this.destination = destination;
    }

    public Integer getNumberOfPassenger() {
        return numberOfPassenger;
    }

    public void setNumberOfPassenger(Integer numberOfPassenger) {
        this.numberOfPassenger = numberOfPassenger;
    }

    public Double getPrice() {
        return Price;
    }

    public void setPrice(Double price) {
        Price = price;
    }

    public String getCurrentLogitude() {
        return currentLogitude;
    }

    public void setCurrentLogitude(String currentLogitude) {
        this.currentLogitude = currentLogitude;
    }

    public String getCurrentLatitude() {
        return currentLatitude;
    }

    public void setCurrentLatitude(String currentLatitude) {
        this.currentLatitude = currentLatitude;
    }
}
